<div id="Backlog">
    <div class="m-subheader">
        <div class="row align-items-center">
            <div class="mr-auto col-auto">
                <h3 class="m-subheader__title m-subheader__title--separator">
                    <span>外包项目报价单</span>
                </h3>
                <span class="m-section__sub">

                </span>
            </div>

        </div>
    </div>

    <div class="m-content">
        <div class="m-portlet m-portlet--mobile" style="padding: 0;">
            <div class="m-portlet__body" style="height: 724px;">
                <div class="row align-items-center">
                    <!--<Primeng-TurboTable-Start>-->
                    <div class="primeng-datatable-container" [busyIf]="primengTableHelper.isLoading">
                        <p-table #dataTable (onLazyLoad)="getBacklogWorkflow($event)" [value]="getWorkflowInstanceViewDtos"
                            rows="{{primengTableHelper.defaultRecordsCountPerPage}}" [paginator]="false" [lazy]="true"
                            [scrollable]="true" ScrollWidth="100%" [responsive]="primengTableHelper.isResponsive"
                            [resizableColumns]="true">
                            <ng-template pTemplate="header">
                                <tr>
                                    <th style="width: 80px">操作 </th>
                                    <th style="width: 30px">序号</th>
                                    <th style="width: 120px"> 申请单编号</th>
                                    <th style="width: 150px"> 发起人</th>
                                    <th style="width: 150px">申请类型</th>
                                    <th style="width: 150px">发起日期 </th>
                                    <th style="width: 150px"> 接收日期 </th>
                                </tr>
                            </ng-template>
                            <ng-template pTemplate="body" let-record="$implicit" let-ri="rowIndex">
                                <tr>
                                    <td style="width: 80px">
                                        <button (click)="quotationworkflow(record.id)" class="btn btn-sm  btn-primary mb-3">
                                            <i class="fa fa-pencil-alt"></i> 处理
                                        </button>
                                    </td>
                                    <td style="width: 30px">
                                        <span class="ui-column-title"> </span> {{ri+1}}
                                    </td>
                                    <td style="width: 120px">
                                        <div [ngSwitch]="record.applyCode">
                                            <div *ngSwitchCase="">
                                                <div class="m-loader m-loader--warning" style="width: 30px; display: inline-block;"></div>
                                            </div>
                                            <div *ngSwitchDefault>
                                                <h6>
                                                    <span class="m--font-metal">
                                                        <font style="vertical-align: inherit;">
                                                            {{record.applyCode}}
                                                        </font>
                                                    </span>
                                                </h6>
                                            </div>
                                        </div>
                                    </td>
                                    <td style="width: 150px">
                                        <div [ngSwitch]="record.poccessorName">
                                            <div *ngSwitchCase="">
                                                <div class="m-loader m-loader--warning" style="width: 30px; display: inline-block;"></div>
                                            </div>
                                            <div *ngSwitchDefault>
                                                <h6>
                                                    <font style="vertical-align: inherit;">
                                                        <span class="m--font-metal"> <i class="la la-user"></i></span>
                                                        <span class="m--font-bold"> {{record.poccessorId}}</span>
                                                    </font><br>
                                                </h6>
                                                <h6>
                                                    <span class="m--font-metal">
                                                        <font style="vertical-align: inherit;">
                                                            {{record.poccessorName}}， {{record.poccessorOuName}}
                                                        </font>
                                                    </span>
                                                </h6>
                                            </div>
                                        </div>
                                    </td>
                                    <td style="width: 150px">
                                        <span class="m--font-boldest"> {{record.workflowDefinitionId}}</span>
                                    </td>
                                    <td style="width: 150px">
                                        {{record.createTime | date:'short' }}
                                    </td>
                                    <!-- <td style="width: 150px">
                                        <div [ngSwitch]="record.currentStepName">
                                            <div *ngSwitchCase="">
                                                <div class="m-loader m-loader--warning" style="width: 30px; display: inline-block;"></div>
                                            </div>
                                            <div *ngSwitchDefault>
                                                <span class="m-badge m-badge--info m-badge--dot"></span>&nbsp;
                                                <span class="m--font-bold"> {{record.currentStepName}}</span>
                                            </div>
                                        </div>
                                    </td> -->
                                    <td style="width: 150px">
                                        <div [ngSwitch]="record.receivedStepTimeInterval">
                                            <div *ngSwitchCase="">
                                                <div class="m-loader m-loader--warning" style="width: 30px; display: inline-block;"></div>
                                            </div>
                                            <div *ngSwitchDefault>
                                                {{record.receivedStepTimeInterval}}
                                            </div>
                                        </div>
                                    </td>

                                </tr>
                            </ng-template>
                        </p-table>
                        <div class="primeng-no-data" *ngIf="primengTableHelper.totalRecordsCount == 0">
                            {{'NoData' | localize}}
                        </div>
                        <div class="primeng-paging-container">
                            <p-paginator [rows]="primengTableHelper.defaultRecordsCountPerPage" #paginator
                                (onPageChange)="getBacklogWorkflow($event)" [totalRecords]="primengTableHelper.totalRecordsCount"
                                [rowsPerPageOptions]="primengTableHelper.predefinedRecordsCountPerPage">

                            </p-paginator>
                            <span class="total-records-count">
                                {{'TotalRecordsCount' | localize:primengTableHelper.totalRecordsCount}}
                            </span>
                        </div>
                    </div>
                    <!--<Primeng-TurboTable-End>-->
                </div>
            </div>
        </div>
    </div>

    <awaitQuotationForm #awaitQuotationForm (modalSave)="getBacklogWorkflow($event)"></awaitQuotationForm>



</div>
